
package biblio.dao;


import biblio.domain.Hire;
import biblio.exception.NoSuchEntityException;
import java.io.Serializable;
import java.util.List;


/**
 * Interface for persistance of Hire.
 * 
 * @author mephisto
 */
public interface HireDAO
{
/**
     * Persists hire given as a parameter in the database.
     *
     * @param hire the hire to set, this entity will be persited in the database
     */
    void create(Hire hire);

    /**
     * Returns found hires indentified by lastName in the database or throws
     * NoSuchEntityException if such hires does not exist.
     *
     * @param title the title to set
     * @return Hire which is identfied by title
     * @throws NoSuchEntityException if no Hire is
     *         associated with this lastName
     */
    List<Hire> find(Serializable title) throws NoSuchEntityException;

    /**
     * Returns the list of all hires stored in the database. List is empty
     * when no entity is stored in the database.
     *
     * @return the list of all hires stored in the database
     */
    List<Hire> selectAll();

    /**
     * Updates found hire in the database or throws
     * NoSuchEntityException if such hire does not exist.
     *
     * @param hire to set the hire which will be updated
     * @throws NoSuchUserException if no User is associated with this id
     */
    void update(Hire hire) throws NoSuchEntityException;

    /**
     * Deletes hire from the database if only exists.
     *
     * @param hire to set the hire which will be deleted
     */
    void delete(Hire hire);
}
